package org.jeecg.modules.bid.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 投标管理表
 * @Author: jeecg-boot
 * @Date:   2025-10-16
 * @Version: V1.0
 */
@Data
@TableName("proc_bid_management")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="proc_bid_management对象", description="投标管理表")
public class BidManagement {

    private static final long serialVersionUID = 1L;

    /**主键ID*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id;

    /**项目名称*/
    @ApiModelProperty(value = "项目名称")
    private String projectName;

    /**方案类型*/
    @ApiModelProperty(value = "方案类型")
    private String schemeType;

    @ApiModelProperty(value = "预算金额")
    @Column(name = "budget_amount")
    private BigDecimal budgetAmount;

    @ApiModelProperty(value = "中标时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "winning_time")
    private Date winningTime;

    /**开标时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开标时间")
    private Date openingTime;

    /**状态*/
    @ApiModelProperty(value = "状态:0-投标中，1-评标中，2-已完成，3-已取消")
    private String bidStatus;

    /**中标供应商*/
    @ApiModelProperty(value = "中标供应商")
    private String winningName;

    /**中标金额(万元)*/
    @ApiModelProperty(value = "中标金额(万元)")
    private BigDecimal bidPrice;


    @ApiModelProperty(value = "已发布采购项目状态：1-公告，2-报名，3-投标，4-开标，5-评标，" +
            "6-中标，7-流标，8-废标，9-撤销，10-延期，11-终止，12-暂停，13-暂停，" +
            "14-重新招标，15-其他")
    @Dict(dicCode = "published_status")
    @Column(name = "published_status")
    private String publishedStatus;


    /**项目编号*/
    @ApiModelProperty(value = "项目编号")
    private String projectNumber;

    /**所属类目*/
    @ApiModelProperty(value = "所属类目")
    private String category;

    /**报名截止*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "报名截止时间")
    private Date registrationDeadline;

    /**公告发布时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "公告截至时间")
    private Date announcementTime;

    /**采购方案Id*/
    @ApiModelProperty(value = "采购方案Id")
    private String purchaseId;

    /**抽签id*/
    @ApiModelProperty(value = "抽签id")
    private String lotteryId;

    @ApiModelProperty(value = "供应商ID")
    @Column(name = "supplier_id")
    private String supplierId;

    @ApiModelProperty(value = "创建日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "create_time")
    private Date createTime;



    @ApiModelProperty(value = "异常状态原因")
    @Column(name = "exception_status_reason")
    private String exceptionStatusReason;

    @ApiModelProperty(value = "异常状态备注")
    @Column(name = "exception_status_remark")
    private String exceptionStatusRemark;

    @ApiModelProperty(value = "更新人")
    @Column(name = "update_by")
    private String updateBy;

    @ApiModelProperty(value = "更新日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Column(name = "update_time")
    private Date updateTime;
}
